074fca6bf6d7f3f01ba3f77697601e64941ebdfe,src/main/java/water/Model.java,Model,adapt,#Frame#boolean#,217
Before Change
* contains only vectors which where adapted
* (the purpose of the second frame is to delete all adapted vectors with deletion of the frame). */
public Frame[] adapt( Frame fr, boolean exact ) {
int map[][] = adapt(fr.names(),fr.domains(),exact);
int cmap[] = map[_names.length-1];
Vec vecs[] = new Vec[_names.length-1];
int avCnt = 0;
for( int c=0; c<cmap.length; c++ ) if (map[c] != null) avCnt++;
Vec[] avecs = new Vec[avCnt]; // list of adapted vectors
String[] anames = new String[avCnt]; // names of adapted vectors
avCnt = 0;
for( int c=0; c<cmap.length; c++ ) { // iterate over columns
int d = cmap[c]; // Data index
if( d == -1 ) throw H2O.unimpl(); // Swap in a new all-NA Vec
else if( map[c] == null ) { // No or identity domain map?
vecs[c] = fr.vecs()[d]; // Just use the Vec as-is
After Change
* second frame is to delete all adapted vectors with deletion of the
* frame). */
public Frame[] adapt( Frame fr, boolean exact ) {
String frnames[] = fr.names();
Vec frvecs[] = fr.vecs();
int map[][] = adapt(frnames,fr.domains(),exact);
int cmap[] = map[_names.length-1];
Vec vecs[] = new Vec[_names.length-1];
int avCnt = 0;
for( int c=0; c<cmap.length; c++ ) if (map[c] != null) avCnt++;
Vec[] avecs = new Vec[avCnt]; // list of adapted vectors
String[] anames = new String[avCnt]; // names of adapted vectors
avCnt = 0;
for( int c=0; c<cmap.length; c++ ) { // iterate over columns
int d = cmap[c]; // Data index
if( d == -1 ) throw H2O.unimpl(); // Swap in a new all-NA Vec
else if( map[c] == null ) { // No or identity domain map?
vecs[c] = frvecs[d]; // Just use the Vec as-is